﻿using Cx.NetCoreUtils.Extensions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Xiao.Web.Controllers
{
    /// <summary>
    /// 工具模块
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class UtilController : ControllerBase
    {
        /// <summary>
        /// Md5解密
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        [HttpGet]
        public string MD5Decrypt(string data)
        {
            return data.MD5Decrypt();
        }
        /// <summary>
        /// Md5加密
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        [HttpGet]
        public string MD5Encrypt(string data)
        {
            return data.MD5Encrypt();
        }
    }
}
